using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

/// <summary>
/// Summary description for ConnectDB
/// </summary>
public class ConnectDB
{
		public SqlConnection conn;
        public void Open() //string server, string database, string user, string pass)
        {
            string connect = ConfigurationManager.ConnectionStrings["MyConectString"].ToString();
            conn = new SqlConnection(connect);
            conn.Open();
        }
        public void Close()
        {
            conn.Close();
        }
        public SqlConnection GetConnect()
        {
            return conn;
        }
}
